Conversation
|
I tried adding unit-tests for DebugDraw but it got ugly fast because it's not easy to mock it. So there are no unittests, but the ExamplesWindow works. |
| /// Draw a closed polygon provided in CCW order. | ||
| /// </summary> | ||
| #pragma warning disable 618 | ||
| [Obsolete("Look out for new calls using Vector2")] |
There was a problem hiding this comment.
Instead of deleting, can you change the description to read "Use Vector2 overload instead" and set the Error flag to true? Then anyone already using these with Vec2 will get guidance as to how to change their code, and we can delete them at a later date.
You would need to create stub methods with no implementation for the old signatures.
| @@ -1,40 +1,49 @@ | |||
| | |||
There was a problem hiding this comment.
Sorry, why box2d-netstandard.sln was changed? It works by keeping it as is. I'd vote to leave it unchanged.
Projects in ./examples and ./src are separated projects, and only ./examples projects can reference ./src projects. If you'd like to have one project solution file, then please just create box2d.sln in the root directory.
| } | ||
|
|
||
| public void DrawSolidCircle(Vec2 center, float radius, Vec2 axis, Color color) | ||
| public void DrawSolidCircle(System.Numerics.Vector2 center, float radius, System.Numerics.Vector2 axis, Color color) |
There was a problem hiding this comment.
I'd just just Vector2 instead of longer System.Numerics.Vector2 because it helps to keep it shorter line here. It's up to you to decide! :)
| @@ -1,72 +1,92 @@ | |||
| | |||
There was a problem hiding this comment.
Same here, sorry. Why box2d-examples-window.sln was changed? It works by keeping it as is. Do you use dotnet build from CLI?
Fixes # 46
#46
I replaced all remaining uses of Vec2 with Vector2. Vec2 is deleted. This is a breaking change, as keeping the old overloads (in class DebugDraw) around didn't make much sense to me. Please advise.
I had issues with project references in both the main and ExamplesWindow solutions: project references to projects that aren't in the sln. I took the liberty to add those to the sln to allow me to build. But putting everything in one solution instead of two (current situation) is probably more elegant, if they need eachother anyway.